package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallSupplier;
import com.appkubes.mall.core.po.MallSupplierExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallSupplierMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSupplierSqlProvider.class, method="countByExample")
    long countByExample(MallSupplierExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallSupplierSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallSupplierExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_supplier",
        "where supplier_key = #{supplierKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String supplierKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_supplier (supplier_key, app_key, ",
        "supplier_name, address, ",
        "tel, recommend_code, ",
        "create_time, update_time, ",
        "version)",
        "values (#{supplierKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{supplierName,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ",
        "#{tel,jdbcType=VARCHAR}, #{recommendCode,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallSupplier record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallSupplierSqlProvider.class, method="insertSelective")
    int insertSelective(MallSupplier record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSupplierSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="supplier_name", property="supplierName", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="recommend_code", property="recommendCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallSupplier> selectByExampleWithRowbounds(MallSupplierExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSupplierSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="supplier_name", property="supplierName", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="recommend_code", property="recommendCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallSupplier> selectByExample(MallSupplierExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "supplier_key, app_key, supplier_name, address, tel, recommend_code, create_time, ",
        "update_time, version",
        "from mall_supplier",
        "where supplier_key = #{supplierKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="supplier_name", property="supplierName", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="recommend_code", property="recommendCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallSupplier selectByPrimaryKey(String supplierKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSupplierSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallSupplier record, @Param("example") MallSupplierExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSupplierSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallSupplier record, @Param("example") MallSupplierExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSupplierSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallSupplier record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier
     *
     * @mbg.generated
     */
    @Update({
        "update mall_supplier",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "supplier_name = #{supplierName,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "tel = #{tel,jdbcType=VARCHAR},",
          "recommend_code = #{recommendCode,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where supplier_key = #{supplierKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallSupplier record);
}